﻿<controls:ChildWindow x:Class="Moonwish.Foundation.Views.ValueObjects.ValueObjectClassDialog"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
                      xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" Width="400" Height="250" Style="{StaticResource ChildWindowStyle}"
           Title="新增分类">
    <Grid x:Name="LayoutRoot" Margin="2">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="50"></ColumnDefinition>
            <ColumnDefinition Width="*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="30" />
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="60"/>
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <TextBlock Grid.Column="0" Grid.Row="0" Text="名称" Margin="2" HorizontalAlignment="Right" VerticalAlignment="Center"></TextBlock>
        <TextBlock Grid.Column="0" Grid.Row="1" Text="编码" Margin="2" HorizontalAlignment="Right" VerticalAlignment="Center"></TextBlock>
        <TextBlock Grid.Column="0" Grid.Row="2" Text="序号" Margin="2" HorizontalAlignment="Right" VerticalAlignment="Center"></TextBlock>
        <TextBlock Grid.Column="0" Grid.Row="3" Text="备注" Margin="2" HorizontalAlignment="Right" VerticalAlignment="Center"></TextBlock>
        <TextBox x:Name="txtName" Text="{Binding Name, Mode=TwoWay,ValidatesOnDataErrors=True}" Grid.Column="1" Grid.Row="0" Margin="8, 2, 2, 2"/>
        <TextBox x:Name="txtCode" Text="{Binding Code, Mode=TwoWay,ValidatesOnDataErrors=True}" Grid.Column="1" Grid.Row="1" Margin="8, 2, 2, 2"/>
        <toolkit:NumericUpDown x:Name="txtOrderNo" Value="{Binding OrderNo, Mode=TwoWay, ValidatesOnDataErrors=True}" Grid.Column="1" Grid.Row="2" Margin="8, 2, 2, 2"/>
        <TextBox x:Name="txtDescription" Text="{Binding Remark, Mode=TwoWay,ValidatesOnDataErrors=True}" Grid.Column="1" Grid.Row="3" Margin="8, 2, 2, 2"/>
        <StackPanel Grid.Row="4" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="2">
            <Button Content="确定" x:Name="BtnOk" Style="{StaticResource ButtonStyle}" Click="BtnOk_Click" VerticalAlignment="Center" HorizontalAlignment="Center"></Button>
            <Button Content="取消" x:Name="BtnCancel" Style="{StaticResource ButtonStyle}" Click="BtnCancel_Click" Margin="10, 0, 0, 0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
            <Button Content="应用" x:Name="BtnApply" Style="{StaticResource ButtonStyle}" Click="BtnApply_Click" Margin="10, 0, 0, 0" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="{Binding ApplyButtonVisibility}"></Button>
        </StackPanel>
    </Grid>
</controls:ChildWindow>